package top.laoshuzi.server.camera

import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.CommandLineRunner
import org.springframework.stereotype.Component

//@Component
class MqttServiceProvider : CommandLineRunner {

//    @Value("\${grpc.garage-service.port}")
//    private val userServicePort: Int = 0


    override fun run(vararg args: String?) {

//        Runtime.getRuntime().addShutdownHook(object : Thread() {
//            override fun run() {
//                server?.shutdown()
//            }
//        })
//
//        startDaemonAwaitThread(server)
    }

//    @Throws(Exception::class)
//    private fun startDaemonAwaitThread(server: Server) {
//        val awaitThread = Thread {
//            try {
//                server.awaitTermination()
//            } catch (ignore: InterruptedException) {
//
//            }
//        }
//        awaitThread.isDaemon = false
//        awaitThread.start()
//    }

}